package org.qqcui.designpattern.patterns.prototype.deepclone;

import java.io.Serializable;

/**
 * 深拷贝目标对象类
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2020-10-18 11:53
 **/
public class DeepCloneTarget implements Serializable, Cloneable {

	private String targetName;

	private Integer targetId;

	public DeepCloneTarget(String targetName, Integer targetId) {
		this.targetName = targetName;
		this.targetId = targetId;
	}

	public String getTargetName() {
		return targetName;
	}

	public void setTargetName(String targetName) {
		this.targetName = targetName;
	}

	public Integer getTargetId() {
		return targetId;
	}

	public void setTargetId(Integer targetId) {
		this.targetId = targetId;
	}

	@Override
	public String toString() {
		return "DeepCloneTarget{" +
				"targetName='" + targetName + '\'' +
				", targetId=" + targetId +
				'}';
	}

	@Override
	protected Object clone() throws CloneNotSupportedException {
		return super.clone();
	}
}
